Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: Try getentropy() then fallback to /dev/random #46

Merged
merged 4 commits into from
Jun 29, 2019

Conversation

josephlr
Copy link
Member

Fixes #38. As we moved files around macos.rs -> ios.rs the diff for this PR is weird. However, the diffs for each individual commit are fine, so review will be easier if you look at those.

As /dev/random and /dev/urandom are the same on macOS. We just use /dev/random to keep our use_file implementation simple.

Tested on macOS with and without getentropy(2)

@newpavlov
Copy link
Member

newpavlov commented Jun 29, 2019

Can you also update lib.rs docs?

@josephlr
Copy link
Member Author

Can you also update lib.rs docs?

Done, I had to link to unix.com's man pages as there doesn't seem to be a good way to view macOS manpages on Apple's website.

@newpavlov
Copy link
Member

Great! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use /dev/urandom on macOS
2 participants